package com.dflc.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dflc.entity.po.TBackLoginUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dflc.entity.req.TBackLoginUserReq;
import com.dflc.entity.vo.TBackLoginUserVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author 86158
* @description 针对表【t_back_login_user(后台管理员账号)】的数据库操作Mapper
* @createDate 2024-11-27 10:54:12
* @Entity com.dflc.entity.dto.TBackLoginUser
*/
public interface TBackLoginUserMapper extends BaseMapper<TBackLoginUser> {

    List<TBackLoginUser> findAllByMap(Map<String, Object> params);
    Page<TBackLoginUserVo> pageQuery(TBackLoginUserReq req);

    List<TBackLoginUserVo> findAllByMap2(Map<String, Object> params);
    List<TBackLoginUserVo> findAllByMap3(Map<String, Object> params);

    @Update("UPDATE t_back_login_user SET last_login_time = #{lastLoginTime},password =#{password} WHERE id = #{id}")
    void updatePhone(@Param("id") Long id, @Param("lastLoginTime") Date lastLoginTime,
                     @Param("password") String password);

    List<TBackLoginUserVo> getUserByUnitAndProcessNode(@Param("unitId") Integer unitId, @Param("processNode") Integer processNode);
}




